﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RoutBaseList.ascx.cs" Inherits="uswinweb.datacontrol.RoutBaseList" %>
		<div class="adnr3">
<table border="0" cellpadding="0" cellspacing="0" class="edtb">
				<thead>
					<tr>
                        <td><input type="checkbox" name="chkall" value="checkbox" id ="chkall"  onclick="CheckAll(this.form,'ids');"/></td>
						<td>起运港</td>
						<td>目的港</td>
						<td>船司</td>
						<td>中转港</td>
						<td>码头</td>
						<td>20GP</td>
						<td>40GP</td>
						<td>40HQ</td>
						<td>附加费用</td>
						<td>截关</td>
						<td>开船</td>
						<td>航程</td>
						<td>有效期</td>
						<td>备注</td>
						<td>状态</td>
						<td>操作</td>
					</tr>
				</thead>
				<tbody>
                <%
                    int iii = 1; 
                    foreach (LTJ.Entity.RouteBaseInfo rbInfo in routesTab)
                  { %>
					<tr>
                    <td><input type="checkbox" name="ids" value="<%=rbInfo.id%>"  id="ids"/></td>
						<td><%=rbInfo.loadportename %></td>
						<td onmouseover="showMsgDiv('<%=iii %>',1,'所属航线：<%=rbInfo.mdghxname %><br/>所属国家：<%=rbInfo.mdggjname %><br/>中文名：<%=rbInfo.mdgname %><br/>英文名：<%=rbInfo.mdgename %><br/>')" onmouseout="hiddMsgDiv()">
                        <div id="minodiv_<%=iii %>_1" onmouseout="hiddMsgDiv()"><a href="../mdg_detail.aspx?type=1&mdg=<%=rbInfo.destport %>" rel="iframe" title=" :: :: width:800,height:600" class="lightview"><%=rbInfo.destportename%>
                        </a></div></td>
						<td onmouseover="showMsgDiv('<%=iii %>',2,'<%=rbInfo.bcodename %>')" onmouseout="hiddMsgDiv()"><div id="minodiv_<%=iii %>_2"><a href="../mdg_detail.aspx?type=2&mdg=<%=rbInfo.bcode %>" rel="iframe" title=" :: :: width:800,height:600" class="lightview"><%=rbInfo.bcode%>
                        </a>
                        </div>
						</td>
						<td>
                        <%=rbInfo.tranport.ToString().Trim() == "" ? "直航" : rbInfo.tranportename%>
						</td>
						<td>
                        <%=rbInfo.pier %>
						</td>
						<td>
                        <%=groupid == 1 ? rbInfo.Reg20.ToString() == "" ? "0" : rbInfo.Reg20.ToString() : rbInfo.Vip20.ToString() == "" ? "0" : rbInfo.Vip20.ToString()%>
						</td>
						<td><%=groupid == 1 ? rbInfo.Reg40.ToString() == "" ? "0" : rbInfo.Reg40.ToString() : rbInfo.Vip40.ToString() == "" ? "0" : rbInfo.Vip40.ToString()%></td>
						<td><%=groupid == 1 ? rbInfo.Reg40HQ.ToString() == "" ? "0" : rbInfo.Reg40HQ : rbInfo.Vip40HQ.ToString() == "" ? "0" : rbInfo.Vip40HQ%></td>
                             <td onmouseover="showMsgDiv('<%=iii %>',5,'文件费：<%=rbInfo.wjfvip.ToString()==""?"0":rbInfo.wjfvip.ToString() %><br/>AMS/ENS:<%=rbInfo.amsensvip.ToString()==""?"0":rbInfo.amsensvip.ToString() %><br/>THC:<%=rbInfo.thcvip.ToString()==""?"0":rbInfo.thcvip.ToString() %><br/>箱单：<%=rbInfo.xdvip.ToString()==""?"0": rbInfo.xdvip.ToString()%>')" onmouseout="hiddMsgDiv()">
                       <div id="minodiv_<%=iii %>_5"> <a href="../fjfy.aspx?rid=<%=rbInfo.id %>" rel="iframe" title=" :: :: width:800,height:600" class="lightview">AMS/ENS:<%= rbInfo.amsensvip.ToString()%></a>
                       </div>
                       </td>
						<td><%=rbInfo.schbegin %></td>
						<td>
                        <%=rbInfo.schend %>
						</td>
						<td>
                        <%=rbInfo.range %>
						</td>
						<td onmouseover="showMsgDiv('<%=iii %>',3,'<%=rbInfo.validbegin %>-<%=rbInfo.validend %>')" onmouseout="hiddMsgDiv()">
                        <div id="minodiv_<%=iii %>_3"><%=rbInfo.validbegin.Substring(rbInfo.validbegin.IndexOf('-')+1,rbInfo.validbegin.Length-rbInfo.validbegin.IndexOf('-')-1).Replace('-','/').TrimStart('0') %>-<%=rbInfo.validend.Substring(rbInfo.validend.IndexOf('-') + 1, rbInfo.validend.Length - rbInfo.validend.IndexOf('-') - 1).Replace('-', '/').TrimStart('0')%>
                        </div>
                        </td>
                        <%if (rbInfo.bio.ToString() == "")
                          { %>
                         <td> &nbsp;</td>
                        <%}
                          else
                          {%>
                          <td onmouseover="showMsgDiv('<%=iii %>',4,'<%=rbInfo.bio.ToString().Length>10?rbInfo.bio.ToString().Substring(0,10):rbInfo.bio.ToString() %>')" onmouseout="hiddMsgDiv()">
                          <div id="minodiv_<%=iii %>_4"><a href="../user/price_beizhu_xx.aspx?rid=<%=rbInfo.id %>" rel="iframe" title=" :: :: width:600,height:400" class="lightview"><%=rbInfo.bio.ToString().Length > 5 ? rbInfo.bio.ToString().Substring(0, 5) : rbInfo.bio.ToString()%></a>
                          </div>
                        </td>
                          <%} %>
                        <td>
                        <%=rbInfo.isuse==1?"有效":"无效" %>
                        </td>
                    <td>
                    &nbsp;
                    <%if (OpAction(LTJ.Entity.OprateAction.Create)){ %>
                    <a href="../user/price_add.aspx?copyid=<%=rbInfo.id %>" rel="iframe" title=" :: :: width:800,height:600" class="l_blue lightview">复制</a>
                    <%}%>
                    <%if (OpAction(LTJ.Entity.OprateAction.Update)){ %>
                    <a href="../user/price_update.aspx?rid=<%=rbInfo.id %>" rel="iframe" title=" :: :: width:800,height:600" class="l_blue lightview">修改</a>
                    <%}%>
                    <%if (OpAction(LTJ.Entity.OprateAction.Delete)){ %>
					<a title="" class="l_blue" href="#" onclick="del('<%=rbInfo.id %>')">删除</a>
                    <%}%>
                    &nbsp;
                    </td>
					</tr>
                    <%
                        iii++;
                    } %>
				</tbody>
			<tfoot>
				<tr>
					<td colspan="25">
						<%=PageListStr %>
					</td>
				</tr>
			</tfoot>
			</table>
            </div>
            <script>
                function del(val) {

                    if (confirm("该操作不可恢复,您确定要删除吗?")) {
                        loading();
                        if (val == 'all') {
                            val = checkedlist('ids');
                        }
                        if (val != "") {
                            AjaxHelper.Updater('RoutBaseList.ascx', 'routbaselistDiv', 'action=del&parms=' + val + '&pagename=<%=pagename%>');
                            parent.reclcik();
                        }
                    } else {
                    }
                }
                function showMsgDiv(val1, val2, val3) {
                    var minoDiv = document.getElementById('minodiv_' + val1 + '_' + val2);
                    var body = document.getElementsByTagName("body")[0];

                    var oldImgdiv = document.getElementById("showMsg");
                    if (oldImgdiv != null) {
                        oldImgdiv.style.display = 'block';
                        oldImgdiv.style.top = getElementTop(minoDiv) + 80 + "px";
                        oldImgdiv.style.left = getElementLeft(minoDiv) + 130 + "px";
                        oldImgdiv.innerHTML = val3;
                    }
                    else {
                        var bodySize = [];
                        bodySize[0] = (document.documentElement.scrollWidth > document.documentElement.clientWidth) ? document.documentElement.scrollWidth : document.documentElement.clientWidth; //如果滚动条的宽度大于页面的宽度，取得滚动条的宽度，否则取页面宽度
                        bodySize[1] = (document.documentElement.scrollHeight > document.documentElement.clientHeight) ? document.documentElement.scrollHeight : document.documentElement.clientHeight; //如果滚动条的高度大于页面的高度，取得滚动条的高度，否则取高度

                        var div = document.createElement("div");
                        div.style.position = "absolute";
                        div.style.top = getElementTop(minoDiv) + 80 + "px";
                        div.style.left = getElementLeft(minoDiv) + 130 + "px";
                        div.style.margin = "-50px 0 0 -100px";
                        div.style.padding = "15px";
                        div.style.border = "0px solid #B2D0F7";
                        div.style.color = "#003366";
                       // div.style.font = "bold 14px verdana,tahoma,helvetica";
                        div.style.textAlign = "center";
                        div.style.background = 'white';
                        div.innerHTML = val3;
                        div.id = "showMsg";
                        body.appendChild(div);
                        div.style.display = "block";
                    }
                }

                function getElementLeft(element) {
                    var actualLeft = element.offsetLeft;
                    var current = element.offsetParent;
                    while (current !== null) {
                        actualLeft += current.offsetLeft;
                        current = current.offsetParent;
                    }
                    return actualLeft;
                }
                function getElementTop(element) {
                    var actualTop = element.offsetTop;
                    var current = element.offsetParent;
                    while (current !== null) {
                        actualTop += current.offsetTop;
                        current = current.offsetParent;
                    }
                    return actualTop;
                }
                function hiddMsgDiv() {
                    document.getElementById('showMsg').style.display = 'none';
                }
            </script>